package com.lc.zpyh.ui.activity.mine;

import android.os.Bundle;
import android.text.Html;
import android.widget.TextView;

import com.hjq.http.EasyHttp;
import com.hjq.http.listener.HttpCallback;
import com.lc.zpyh.R;
import com.lc.zpyh.app.AppActivity;
import com.lc.zpyh.http.request.CooperationApi;
import com.lc.zpyh.http.request.PublicMsgBean;

import butterknife.BindView;
import butterknife.ButterKnife;

public class CooperateActivity extends AppActivity {
    @BindView(R.id.tv_hezuo)
    TextView tvHezuo;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_cooperate;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
        cooperation();
    }

    private void cooperation() {
        EasyHttp.post(this)
                .api(new CooperationApi()).request(new HttpCallback<PublicMsgBean>(this) {

            @Override
            public void onSucceed(PublicMsgBean data) {
                if (data.getCode() == 0) {
                    tvHezuo.setText(Html.fromHtml(data.getList()));
                }

            }

            @Override
            public void onFail(Exception e) {
                super.onFail(e);

            }
        });
    }

}
